package com.shop.feign;

import com.shop.feign.impl.SearchFeignImpl;
import com.shop.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@FeignClient(value = "website-search-1050",fallback = SearchFeignImpl.class)
@Component
public interface SearchFeign {

    //商品上架到es
    @PostMapping("/search/addSpu/{spuId}")
    public R addSku(@PathVariable("spuId") Long spuId);
    //商品从es下架
    @DeleteMapping("/search/delSpu/{spuId}")
    public R delSku(@PathVariable("spuId") Long spuId);
}
